﻿// description  : 实体容器
// author       : tristan
// created      : 2011/3/10
// contact      : snaprack@gmail.com

namespace RBAC
{

    /// <summary>
    /// 实体容器
    /// </summary>
    public partial class EntityContext
    {
        /// <summary>
        /// 获得容器实例
        /// </summary>
        public static EntityContext GetInstance()
        {
            EntityContext instance = null;

            IShortHolder<EntityContext> holder = HolderFactory.Creat<EntityContext>();

            if (!holder.TryGet(ref instance))
            {
                instance = holder.Register();
            }

            return instance;
        }
    }
}
